function $class(className) {
    return document.getElementsByClassName(className)
}
function $id(id) {
    return document.getElementById(id)
}
function $tag(tag) {
    return document.getElementsByTagName(tag)
}
//fps
function showFPS() {
    var fps=0;
    var fpsDiv=document.createElement("DIV");
    fpsDiv.setAttribute("class","w100 h40 pof t0 l0 c#f00");
    document.body.appendChild(fpsDiv);
    callback();
    function callback() {
        fps++;
        window.requestAnimationFrame(callback);
    }
    fpsDiv.innerHTML="loading...";
    setInterval(function () {
        fpsDiv.innerHTML="fps "+fps;
        console.log("fps "+fps);
        fps=0;
    },1000);
}